package com.qidian.buy.mq;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.context.annotation.Configuration;

/**
 * @author 戴着假发的程序员
 * @company 起点编程
 * @date 2023/9/15 10:18
 */
@Configuration
public class TopicExchangeReceive {

    @RabbitListener(queues = {"topicA"})
    public void receiveA(String msg){
        System.out.println("topicA端收到消息： " + msg);
    }
    @RabbitListener(queues = {"topicB"})
    public void receiveB(String msg){
        System.out.println("topicB端收到消息： " + msg);
    }
    @RabbitListener(queues = {"topicC"})
    public void receiveC(String msg){
        System.out.println("topicC端收到消息： " + msg);
    }
}
